package com.ruoyi.canteen.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 主订单对象 canteen_cp_order
 * 
 * @author zhangw
 * @date 2021-09-19
 */
@Data
public class CanteenCpOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增主键 */
    private Long id;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderNo;

    /** 订单类型 */
    @Excel(name = "订单类型")
    private String orderType;

    /** 门店ID */
    @Excel(name = "门店ID")
    private Long mdId;

    /** 下单用户ID */
    @Excel(name = "下单用户ID")
    private Long userId;

    /** 工号 */
    @Excel(name = "工号")
    private String userCode;

    /** 送餐联系人 */
    @Excel(name = "送餐联系人")
    private String deliverLinkMan;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String phone;

    /** 送餐地址 */
    @Excel(name = "送餐地址")
    private String address;

    /** 送餐地址ID */
    @Excel(name = "送餐地址ID")
    private Long addressId;

    /** 订单金额 */
    @Excel(name = "订单金额")
//    private Double totalPrice;
    private BigDecimal totalPrice;

    /** 付款方式：1、微信; 2、现金 */
    @Excel(name = "付款方式：1、微信; 2、现金")
    private Long payType;

    /** 是否付款0未1已 */
    @Excel(name = "是否付款0未1已")
    private String payFlag;

    /** 订单状态：1、已付款；2、制作中；3、配送中； */
    @Excel(name = "订单状态：1、已付款；2、制作中；3、配送中；")
    private Long orderStatus;

    /** 流水号 存储微信支付订单号 */
    @Excel(name = "流水号 存储微信支付订单号")
    private String serialNo;

    /** $column.columnComment */
    @Excel(name = "流水号 存储微信支付订单号")
    private String mealCode;

    /** 用户下单备注 */
    @Excel(name = "用户下单备注")
    private String orderNotes;

    /** 要求送餐时间段id */
    @Excel(name = "要求送餐时间段id")
    private String requireDeliverId;

    /** 预计送餐时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预计送餐时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planDeliverTime;

    /** 实际送达时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际送达时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date realDeliverTime;

    /** 是否送餐：0未送1已送 */
    @Excel(name = "是否送餐：0未送1已送")
    private String sended;


    private CanteenOrderAddress orderAddress;

    private CanteenMdDeliver mdDeliver;

    public CanteenOrderAddress getOrderAddress() {
        return orderAddress;
    }

    public void setOrderAddress(CanteenOrderAddress orderAddress) {
        this.orderAddress = orderAddress;
    }

    public CanteenMdDeliver getMdDeliver() {
        return mdDeliver;
    }

    public void setMdDeliver(CanteenMdDeliver mdDeliver) {
        this.mdDeliver = mdDeliver;
    }
}
